<?php

class Tang_model extends CI_Model
{
/*
	function getAll() {
		$q = $this->db->query("SELECT * FROM data where id < 1000 and length(content)>1");
		if($q->num_rows() > 0) {
			foreach($q->result() as $row) {
				$data[] = $row;
			}
			return $data;
		}
	}
	
*/
	
	function get_records()
	{
		$query = $this->db->get('data');
		return $query->result();
	}
	
	function add_record($data) 
	{
		$this->db->insert('data', $data);
		return;
	}
}
?>